package com.tianxin.workbao.workBao.Activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.annotation.Nullable;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.Toolbar;
import android.util.AttributeSet;
import android.view.View;

import com.tianxin.workbao.workBao.R;

/**
 * Created by hacker on 2017/6/22.
 */

public class LoadCarEntranceActivity extends BaseActivity {

    private FloatingActionButton mFab;

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.initStatusBar(true);
        setContentView(R.layout.load_car_entance);

        initView();

        initData();

        initEvent();
    }

    @Override
    public View onCreateView(View parent, String name, Context context, AttributeSet attrs) {
        return super.onCreateView(parent, name, context, attrs);
    }


    public void initView() {
        mToolbar = findViewById(R.id.toolbar);
        mToolbar.setTitle(R.string.load_car_entrance);
        setSupportActionBar(mToolbar);
        mToolbar.setNavigationIcon(AppCompatResources.getDrawable(this, R.drawable.ic_action_back_24dp));
        mFab = findViewById(R.id.loac_car_entrance_fab);
    }
    @Override
    public void initData() {

    }
    @Override
    public void initEvent() {
        mFab.setOnClickListener(view -> {
            Intent intent = new Intent(LoadCarEntranceActivity.this, LoadCarListActivity.class);
            startActivity(intent);
        });
        //navigationIcon event
        mToolbar.setNavigationOnClickListener(view -> LoadCarEntranceActivity.this.finish());
    }

    @Override
    public void bindView() {

    }

    @Override
    public View onCreateView(String name, Context context, AttributeSet attrs) {
        return super.onCreateView(name, context, attrs);
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
    }

}
